<?php
require_once("../includes/config.inc.php");

$userName = htmlspecialchars(trim(addslashes($_POST['userName'])));
$password = htmlspecialchars(trim(addslashes($_POST['password'])));



$sql="SELECT adminId from tbl_admin where userName='$userName' and password='$password' and status ='1'";
$result = executeQuery($sql);

if (mysql_num_rows($result)>0)
{
	$row=mysql_fetch_array($result);
	$_SESSION['sess_admin_id']=$row['adminId'];

	header("Location: admin_desktop.php");
	exit;
}
else
{
	header("Location: index.php?invalid=1");
	exit;
}
?>
